<template>
  <div class="image-upload">
    <el-upload
      class="upload-demo"
      drag
      action="https://jsonplaceholder.typicode.com/posts/"
      multiple
    >
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">
        将文件拖到此处，或<em>点击上传</em>。单次最多选3张
      </div>
      <div class="el-upload__tip" slot="tip" v-if="isTip">
        请选择jpg,png,jpeg格式的图片上传(图片规范:①数量不超过7张;②大小不超过2M)。
        首张图片默认作为商品主图
      </div>
    </el-upload>
  </div>
</template>
<script>
export default {
  name: "Publish",
  props: {
    isTip: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {};
  },
  created(){
  }
};
</script>
  <style scoped lang="scss">
@import "@/style/color.scss";
.el-upload__tip {
  color: red;
}
</style>
